<% if resource.errors.any? %>
  <div id="error_explanation" class="text-red-500">
    <h2 class="font-semibold text-lg">
      <%= I18n.t("errors.messages.not_saved",
                 count: resource.errors.count,
                 resource: resource.class.model_name.human.downcase)
       %>
    </h2>
    <ul class="list-none p-0">
      <% resource.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
    </ul>
  </div>
<% end %>
